package sit.mycatalog.ejb.dao;

import java.util.List;

import javax.ejb.LocalBean;
import javax.ejb.Stateless;

import sit.mycatalog.jpa.Item;
import sit.mycatalog.jpa.Sysuser;
import sit.mycatalog.util.AbstractDao;
import sit.mycatalog.util.ParamBinder;

/**
 * Session Bean implementation class SysuserDao
 */
@Stateless
@LocalBean
public class SysuserDao extends AbstractDao<Sysuser> {

    /**
     * Default constructor. 
     */
    public SysuserDao() {
    	super(Sysuser.class);
    }
    
    public List<Sysuser> findAll() throws Exception {
		List<Sysuser> lsSysuser= null;

		try {
			StringBuilder sql = new StringBuilder();
			sql.append("SELECT s \n");
			sql.append("FROM Sysuser s \n");
			sql.append("ORDER BY s.usrid");

			lsSysuser = findList(sql);

		} catch (Exception e) {
			throw new Exception("findAll(): " + e.getMessage(), e);
		}

		return lsSysuser;
	}

}
